using UnityEngine;

public class MazeCell : MonoBehaviour
{
    [SerializeField]
    private GameObject _leftWall; // 左墙

    [SerializeField]
    private GameObject _rightWall; // 右墙

    [SerializeField]
    private GameObject _frontWall; // 前墙

    [SerializeField]
    private GameObject _backWall; // 后墙

    public bool IsVisited { get; private set; } // 是否已访问

    // 标记单元格为已访问
    public void Visit()
    {
        IsVisited = true;
    }

    // 清除左墙
    public void ClearLeftWall()
    {
        _leftWall.SetActive(false);
    }

    // 清除右墙
    public void ClearRightWall()
    {
        _rightWall.SetActive(false);
    }

    // 清除前墙
    public void ClearFrontWall()
    {
        _frontWall.SetActive(false);
    }

    // 清除后墙
    public void ClearBackWall()
    {
        _backWall.SetActive(false);
    }
}